//package com.blog.blogservice.infra.exception;
//
//import com.blog.blogservice.domain.entity.BaseResponse;
//import org.apache.shiro.ShiroException;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//import org.springframework.web.bind.annotation.RestControllerAdvice;
//
//@RestControllerAdvice
//public class MyExceptionHandler {
//    // 捕捉shiro的异常
//    @ExceptionHandler({ShiroException.class})
//    public BaseResponse handleShiroException(ShiroException e) {
//        BaseResponse ret = new BaseResponse();
//        ret.setCode("401");
//        ret.setMessage(e.getMessage());
//        return ret;
//    }
//
//    @ExceptionHandler({Exception.class})
//    public BaseResponse handleException(Exception e) {
//        BaseResponse ret = new BaseResponse();
//        ret.setCode("400001");
//        ret.setMessage(e.getMessage());
//        return ret;
//    }
//
//}
